﻿namespace SouthKoreaCoffee.RobotModel
{
    public class RobotModelLeft
    {
        private static RobotModelLeft instance;
        private RobotModelLeft() { }
        public static RobotModelLeft Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new RobotModelLeft();
                }
                return instance;
            }
        }
        #region 机器人左臂操作
        /// <summary>
        /// 去1接杯8OZ 开 8
        /// </summary>
        public void RobotQJB1_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)40, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去1接杯8OZ 关 8
        /// </summary>
        public void RobotQJB1_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)40, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去2接杯12OZ 开 9
        /// </summary>
        public void RobotQJB2_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)41, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去2接杯12OZ 关 9
        /// </summary>
        public void RobotQJB2_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)41, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 出餐完成 开 10
        /// </summary>
        public void RobotCCWC_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)42, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 出餐完成 关 10
        /// </summary>
        public void RobotCCWC_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)42, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去检测接杯 开 11
        /// </summary>
        public void RobotQJCJB_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)43, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去检测接杯 关 11
        /// </summary>
        public void RobotQJCJB_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)43, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去接果糖 开 12
        /// </summary>
        public void RobotQJGT_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)44, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去接果糖 关 12
        /// </summary>
        public void RobotQJGT_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)44, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去打印 开 13
        /// </summary>
        public void RobotQDY_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)45, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去打印 关 13
        /// </summary>
        public void RobotQDY_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)45, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 打印完成 开 14
        /// </summary>
        public void RobotDYWC_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)46, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 打印完成 关 14
        /// </summary>
        public void RobotDYWC_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)46, false);
            }
            catch
            {
            }
        }

        /// <summary>
        /// 咖啡完成 开 15
        /// </summary>
        public void RobotKFWC_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)47, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 咖啡完成 关 15
        /// </summary>
        public void RobotKFWC_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)47, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 开始制作 开 16
        /// </summary>
        public void RobotKSZZ_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)48, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 开始制作 关 16
        /// </summary>
        public void RobotKSZZ_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)48, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 接杯成功 开 17
        /// </summary>
        public void RobotJBCG_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)49, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 接杯成功 关 17
        /// </summary>
        public void RobotJBCG_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)49, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 接杯失败 开 18
        /// </summary>
        public void RobotJBSB_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)50, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 接杯失败 关 18
        /// </summary>
        public void RobotJBSB_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)50, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去接咖啡 开 19
        /// </summary>
        public void RobotQJKF_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)51, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去接咖啡 关 19
        /// </summary>
        public void RobotQJKF_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)51, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去接冰 开 20
        /// </summary>
        public void RobotQJB_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)52, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去接冰 关 20
        /// </summary>
        public void RobotQJB_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)52, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 接冰完成 开 21
        /// </summary>
        public void RobotJBWC_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)53, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 接冰完成 关 21
        /// </summary>
        public void RobotJBWC_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)53, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 果糖完成 开 22
        /// </summary>
        public void RobotGTWC_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)54, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 果糖完成 关 22
        /// </summary>
        public void RobotGTWC_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)54, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 无奶咖啡 开 23
        /// </summary>
        public void RobotWNKF_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)55, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 无奶咖啡 关 23
        /// </summary>
        public void RobotWNKF_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)55, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去招手 开 24
        /// </summary>
        public void RobotQZS_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)56, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去招手 关 24
        /// </summary>
        public void RobotQZS_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)56, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去弃杯1 开 25
        /// </summary>
        public void RobotQQB1_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)57, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去弃杯1 关 25
        /// </summary>
        public void RobotQQB1_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)57, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去弃杯2 开 26
        /// </summary>
        public void RobotQQB2_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)58, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去弃杯2 关 26
        /// </summary>
        public void RobotQQB2_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)58, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去弃杯3 开 27
        /// </summary>
        public void RobotQQB3_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)59, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去弃杯3 关 27
        /// </summary>
        public void RobotQQB3_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)59, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去出餐1 开 28
        /// </summary>
        public void RobotQCC1_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)60, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去出餐1 关 28
        /// </summary>
        public void RobotQCC1_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)60, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去出餐2 开 29
        /// </summary>
        public void RobotQCC2_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)61, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去出餐2 关 29
        /// </summary>
        public void RobotQCC2_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)61, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去弃杯 开 41
        /// </summary>
        public void RobotQQB_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)73, true);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 去弃杯 关 41
        /// </summary>
        public void RobotQQB_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)73, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 机器人停止运行左 开 30
        /// </summary>
        public void RobotJQRTZYXL_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)62, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///  机器人停止运行左 关 30
        /// </summary>
        public void RobotJQRTZYXL_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)62, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 机器人运行左 开 31
        /// </summary>
        public void RobotJQRYXL_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)63, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///  机器人运行左 关 31
        /// </summary>
        public void RobotJQRYXL_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)63, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 机器人报警确认左 开 32
        /// </summary>
        public void RobotJQRBJQRL_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)64, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///  机器人报警确认左 关 32
        /// </summary>
        public void RobotJQRBJQRL_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)64, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 机器人上电左 开 33
        /// </summary>
        public void RobotJQRSDL_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)65, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///  机器人上电左 关 33
        /// </summary>
        public void RobotJQRSDL_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)65, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 机器人下电左 开 34
        /// </summary>
        public void RobotJQRXDL_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)66, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///  机器人下电左 关 34
        /// </summary>
        public void RobotJQRXDL_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)66, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 机器人使能左 开 35
        /// </summary>
        public void RobotJQRSNL_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)67, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///  机器人使能左 关 35
        /// </summary>
        public void RobotJQRSNL_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)67, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 机器人下使能左 开 36
        /// </summary>
        public void RobotJQRXSNL_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)68, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///  机器人下使能左 关 36
        /// </summary>
        public void RobotJQRXSNL_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)68, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 机器人暂停左 开 37
        /// </summary>
        public void RobotJQRZTL_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)69, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///  机器人暂停左 关 37
        /// </summary>
        public void RobotJQRZTL_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)69, false);
            }
            catch
            {
            }
        }
        /// <summary>
        /// 机器人继续运行左 开 38
        /// </summary>
        public void RobotJQRJXYXL_UP()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)70, true);
            }
            catch
            {
            }
        }
        /// <summary>
        ///  机器人继续运行左 关 38
        /// </summary>
        public void RobotJQRJXYXL_Down()
        {
            try
            {
                RobotSerialPortLeft.Instance.WriteSingleCoil(1, (ushort)70, false);
            }
            catch
            {
            }
        }
        #endregion
        #region 机器人左臂查询
        /// <summary>
        /// 到原点 8
        /// </summary>
        public bool LRobotDYD_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)8, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到出餐点 9
        /// </summary>
        public bool LRobotDCCD_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)9, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到落杯点18OZ 10
        /// </summary>
        public bool LRobotDLBD1_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)10, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到落杯点212OZ 11
        /// </summary>
        public bool LRobotDLBD2_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)11, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到达果糖 12
        /// </summary>
        public bool LRobotDDGT_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)12, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到打印 13
        /// </summary>
        public bool LRobotDDY_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)13, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到咖啡 14
        /// </summary>
        public bool LRobotDKF_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)14, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到接杯检测 15
        /// </summary>
        public bool LRobotDJBJC_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)15, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到接冰点 16
        /// </summary>
        public bool LRobotDJBD_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)16, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        ///招手完成 17
        /// </summary>
        public bool LRobotZSWC_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)17, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到弃杯1 18
        /// </summary>
        public bool LRobotDQB1_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)18, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到弃杯2 19
        /// </summary>
        public bool LRobotDQB2_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)19, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 到弃杯3 20
        /// </summary>
        public bool LRobotDQB3_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)20, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 弃杯完成 21
        /// </summary>
        public bool LRobotQBWC_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)21, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 机器人1运行 30
        /// </summary>
        public bool LRobotJQRYX_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)30, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 机器人1报警 31
        /// </summary>
        public bool LRobotJQRBJ_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)31, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 机器人1急停 32
        /// </summary>
        public bool LRobotQJRJT_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)32, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 机器人1已开机 33
        /// </summary>
        public bool LRobotJQRYKJ_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)33, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 机器人1已上电 34
        /// </summary>
        public bool LRobotJQRYSD_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)34, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 机器人1已使能 35
        /// </summary>
        public bool LRobotJQRYSN_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)35, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 机器人1暂停 36
        /// </summary>
        public bool LRobotJQRZT_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)36, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        /// <summary>
        /// 机器人1运动中 37
        /// </summary>
        public bool LRobotJQRYDZ_Sel()
        {
            try
            {
                return RobotSerialPortLeft.Instance.ReadDiscreteInputs(1, (ushort)37, (ushort)1)[0];
            }
            catch
            {
                return false;
            }
        }
        #endregion
    }
}
